package com.xiaou.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Select;

import com.xiaou.entity.Permission;
import com.xiaou.entity.Role;

public interface PermissionMapper {

	@Select("SELECT * FROM role where id = (select rid from users_role where uid =#{v})")
	Role findRoleById(Integer uid);
	@Select("SELECT * FROM permission where id in (select pid from permission_role where rid =#{v})")
	List<Permission> findPermissionByRid(Integer id);
	
	
}
